package com.hc.componentstarter.config;

import com.hc.CustomProperties;
import com.hc.CustomService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


//@Configuration
public class CustomServiceConfig {
    /**
     * 有自定义的则不使用自动配置类生成的
     * @return
     */
    @Bean
    public CustomService getNewCustomService(){
        CustomProperties customProperties = new CustomProperties();
        customProperties.setName("自定义的名称");
        return new CustomService(customProperties);
    }
}
